package com.FourTest;

import java.io.Serializable;

public class UserMesg  implements Serializable {
        private static final long serialVersionUID = 8865793855078828309L;
        private String TYPE;
        private User user;

        public UserMesg() {
        }

        public UserMesg(String TYPE, User user) {
            this.TYPE = TYPE;
            this.user = user;
        }

        public String getTYPE() {
            return TYPE;
        }

        public void setTYPE(String TYPE) {
            this.TYPE = TYPE;
        }

        public User getUser() {
            return user;
        }

        public void setUser(User user) {
            this.user = user;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            UserMesg that = (UserMesg) o;

            if (TYPE != null ? !TYPE.equals(that.TYPE) : that.TYPE != null) return false;
            return user != null ? user.equals(that.user) : that.user == null;
        }

        @Override
        public int hashCode() {
            int result = TYPE != null ? TYPE.hashCode() : 0;
            result = 31 * result + (user != null ? user.hashCode() : 0);
            return result;
        }

        @Override
        public String toString() {
            return "UserMessage{" +
                    "TYPE='" + TYPE + '\'' +
                    ", user=" + user +
                    '}';
        }


}
